package com.moyang.learn.example190223hikaricp.service;

import com.moyang.learn.example190223hikaricp.entity.User;
import com.moyang.learn.example190223hikaricp.resposity.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author wangxiyue@cyou-inc.com
 * @time 2019-02-23
 */
@Service
@Transactional
public class UserService {

    @Autowired
    UserRepository userRepository;

    public User getUser(String id) {
        return userRepository.getOne(id);
    }
}
